Skip to content

fix: macOS support - orchestrator venv and MPS detection#10

Merged
akatz-ai merged 3 commits intomainfrom
dev
Dec 10, 2025
Merged

fix: macOS support - orchestrator venv and MPS detection#10
akatz-ai merged 3 commits intomainfrom
dev

Conversation

@akatz-ai
Copy link
Copy Markdown
Member

Summary

  • Fix orchestrator venv creation failing on macOS with dyld: Library not loaded: libpython3.12.dylib
  • Fix incorrect --cpu flag being added on macOS (should use MPS)
  • Make comfygit-dev script portable across macOS/Linux/WSL
  • Bump version to 0.0.10

Changes

Orchestrator Venv Fix (server/orchestrator.py)

The orchestrator venv was failing on macOS because venv.create() copied Python binaries with hardcoded @executable_path/../lib/libpython3.12.dylib paths, but didn't copy the actual dylib.

Solution: Use UVCommand from comfygit_core (bundled uv binary) which creates symlinks by default, falling back to venv.create(..., symlinks=True) if unavailable.

MPS Detection Fix (server/orchestrator.py)

PyTorch MPS builds on macOS don't have a version suffix (like +cu128 for CUDA). The code was incorrectly treating no-suffix as CPU-only and adding --cpu flag.

Solution: Check platform - on Darwin, no suffix means MPS build, not CPU-only.

Portable Dev Script (scripts/comfygit-dev)

  • Auto-detect CORE_PATH as sibling repo instead of hardcoded Linux path
  • Handle symlink resolution on macOS without coreutils
  • Default COMFYUI path to $HOME/ComfyUI

Test plan

  • Tested environment switching on macOS - uses MPS correctly
  • Unit tests pass (uv run pytest testing/unit/test_orchestrator_venv.py)
  • Test on Linux/WSL to verify no regression

- Fix dyld "Library not loaded: libpython3.12.dylib" error on macOS by
  using UVCommand (bundled uv) for venv creation with symlinks, falling
  back to venv.create(..., symlinks=True) if unavailable

- Fix incorrect --cpu flag on macOS by detecting platform - PyTorch MPS
  builds don't have a version suffix like CUDA (+cu128), so on Darwin
  treat no suffix as MPS rather than CPU-only

- Make comfygit-dev script portable across macOS/Linux/WSL by auto-
  detecting CORE_PATH relative to manager path instead of hardcoded path

- Update tests to verify uv-first strategy and stdlib fallback behavior
@akatz-ai akatz-ai merged commit 9d90ef9 into main Dec 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant